package com.zlcode.order.controller;

import com.zlcode.order.mapper.OrderMapper;
import com.zlcode.order.model.OrderInfo;
import com.zlcode.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/order")
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("/{orderId}")
    public OrderInfo getOrderById(@PathVariable("orderId") Integer id) {
        return orderService.selectOrderById(id);
    }

}
